package com.ysw.validator.bean;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @ClassName ValidatorV2Bean
 * @Description TODO
 * @Author ysw
 * @Date 2022/5/12 23:12
 */
@Data
public class ValidatorV2Bean {
    @NotBlank(message = "级联name 不能为空")
    private String name;
    @NotNull(message = "级联子属性不能为空")
    private Integer age;
    @NotEmpty(message = "级联list 不能为空")
    @Size(min = 1,max = 2,message = "级联元素个数不满足要求")
    private List<String> strings;
}